<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<style type="text/css">
body{
	FONT-SIZE: 12px
}
</style>
</head>
<%String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%>
<link href="<%=basePath%>/css/common.css" rel="stylesheet" type="text/css"/>
<body>
<!--------------------------------------------- 查询栏start --------------------------------------------->
	 			<form action="/bookDeviceSys/user/user!selectByConditions.action?user.action=inConditions" method="post">
	 			<table border="0" width="100%" cellpadding="0" cellspacing="0">
	 				<tr>
	 					<td>用户ID<input type="text" name="user.id" value="${user.id}">&nbsp;用户名<input type="text" name="user.name" value="${user.name}">
	 					&nbsp;密码<input type="text" name="user.password" value="${user.password}"></td>
	 				</tr>

					<tr>
	 					<td>邮箱<input type="text" name="user.email" value="${user.email}">电话<input type="text" name="user.phone" value="${user.phone}">
	 					班级<input type="text" name="user.uclass" value="${user.uclass }"><input type="submit" value="查询"></td>
	 				</tr>
	 			</table>
	 		</form>
<!--------------------------------------------- 查询栏end --------------------------------------------->
<hr color="black">
  <TABLE class=gridView style="WIDTH: 100%; BORDER-COLLAPSE: collapse" cellSpacing=0 rules=all border=1>
              <TBODY>
              	<TR>
                  <TH class=gridViewHeader1 style="WIDTH: 50px" scope=col></TH>
                  <TH class=gridViewHeader1 scope=col>用户ID</TH>
                  <TH class=gridViewHeader1 scope=col>用户名</TH>
                  <TH class=gridViewHeader1 scope=col>用户密码</TH>
                  <TH class=gridViewHeader1 scope=col>邮箱</TH>
                  <TH class=gridViewHeader1 scope=col>电话</TH>
                  <TH class=gridViewHeader1 scope=col>类型</TH>
                  <TH class=gridViewHeader1 scope=col>班级</TH>
                  <TH class=gridViewHeader1 scope=col>操作</TH>
                </TR>
           <s:iterator value="#request.userList" var="userVo">
			 	<TR>
			 	<TD class=gridViewItem style="WIDTH: 50px"><img src="<%=basePath%>/images/bg_users.gif"></TD>
			 	<TD class=gridViewItem><s:property value="#userVo.id"/></TD>
			 	<TD class=gridViewItem><s:property value="#userVo.name"/></TD>
			 	<TD class=gridViewItem><s:property value="#userVo.password"/></TD>
			 	<s:if test="#userVo.email == 'null'">
			 	<TD class=gridViewItem><font color="color">该用户未留下邮箱</font></TD>
			 	</s:if>
			 	<s:else>
			 	<TD class=gridViewItem><s:property value="#userVo.email"/></TD>
			 	</s:else>
			 	<s:if test="#userVo.phone == 'null'">
			 	<TD class=gridViewItem><font color="color">该用户未留下联系电话</font></TD>
			 	</s:if>
			 	<s:else>
			 	<TD class=gridViewItem><s:property value="#userVo.phone"/></TD>
			 	</s:else>
			 	<s:if test="#userVo.typeName == 'null'">
			 	<TD class=gridViewItem><font color="color">用户类型不存在</font></TD>
			 	</s:if>
			 	<s:else>
			 	<TD class=gridViewItem><s:property value="#userVo.typeName"/></TD>
			 	</s:else>
			 	<s:if test="#userVo.uclass == 'null'">
			 	<TD class=gridViewItem></TD>
			 	</s:if>
			 	<s:else>
			 	<TD class=gridViewItem><s:property value="#userVo.uclass"/></TD>
			 	</s:else>
			 	<TD class=gridViewItem><A class=cmdField href="/bookDeviceSys/user/user!selectByConditions.action?user.id=${userVo.id}"><img width="20px" height="20px" src="<%=basePath%>/images/update.jpg" title="编辑"></A>
			 	<A class=cmdField onclick="return confirm('确定要删除吗？');" href="/bookDeviceSys/user/user!deleteUser.action?user.id=${userVo.id }"><img width="20px" height="20px" src="<%=basePath%>/images/delete.png" title="删除"></A>
			 	</TD>
           
			 	</TR>
	
			</s:iterator>
          </TBODY>
         </TABLE>
</body>
</html>